package com.cc.blog.controller;

import com.cc.blog.entity.SysUser;
import com.cc.blog.utils.UserThreadLocal;
import com.cc.blog.vo.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/test")
@Slf4j
public class TestController {

    @GetMapping
    public Result test(){
        SysUser sysUser = UserThreadLocal.get();
        log.info(sysUser.toString());
        return Result.success("hello");
    }
}
